<div class="row title">
	<div class="col-xs-3 col-sm-3 col-md-3"> </div>
	<div class="col-xs-9 col-sm-9 col-md-9"><h2><?= $category['Category']['name'];?></h2></div>
</div>

<div class="row">
	<!-- Nav -->
	<div class="col-xs-3 col-sm-3 col-md-3">
		<ul class="sidebar">
			<?php foreach($items as $item): ?>
			<li <?= $category['Category']['id'] == $item['Category']['id'] ? 'class="active"' : '' ?>><a href="<?= $this->webroot.'products/lists/'.$item['Category']['id'] ?>"><?= $item['Category']['name'] ?> </a></li>
			<?php endforeach; ?>
		</ul>
	</div>
	<!-- End Nav -->

	<!-- Main Right -->
	<div class="col-xs-9 col-sm-9 col-md-9">
		<!-- End siler -->
		<?php if(isset($images) && count($images) > 0): ?>
		<div id="slider" class="carousel slide mb30" data-ride="carousel">
			<!-- Indicators -->
			<ol class="carousel-indicators">
				<?php foreach($images as $k => $img):?>
				<li data-target="#slider" data-slide-to="<?= $k ?>" <?= $k == 0 ? 'class="active"' : '' ?>></li>
				<?php endforeach;?>
			</ol>

			<!-- Wrapper for slides -->
			<div class="carousel-inner">
				<?php foreach($images as $k => $img):?>
				<div class="item <?= $k == 0 ? 'active' : '' ?>">
					<img src="<?= PUBLIC_DETAIL_SHOW. $img['Image']['image'] ?>" alt="">
					<div class="carousel-caption"></div>
				</div>
				<?php endforeach;?>
			</div>

			<!-- Controls -->
			<a class="left carousel-control" href="#slider" role="button" data-slide="prev">
				<span class="glyphicon glyphicon-chevron-left"></span>
			</a>
			<a class="right carousel-control" href="#slider" role="button" data-slide="next">
				<span class="glyphicon glyphicon-chevron-right"></span>
			</a>
		</div>
		<?php endif; ?>
		<!-- End siler -->

		<!-- Content -->
		<div class="content"><?= $category['Category']['desc'] ?></div>
		<!-- End Content -->

		<div class="row product">
			<?php if(count($products) > 0):?>
			<?php foreach( $products as $p ):?>
			<div class="col-xs-3 col-sm-3 col-md-3">
				<div class="thumbnail">
					<?php if(!empty($p['Product']['image'])):?>
					<a href="<?= $this->webroot.'products/detail/'.$p['Product']['id'] ?>"><img data-src="<?= PUBLIC_THUMB_SHOW. $p['Product']['image'] ?>" src="<?= PUBLIC_THUMB_SHOW. $p['Product']['image'] ?>" alt="..." /></a>
					<?php endif; ?>
				  	<div class="caption">
						<h4><a href="<?= $this->webroot.'products/detail/'.$p['Product']['id'] ?>"><?= $p['Product']['name'] ?></a></h4>
						<!-- <p><?= $p['Product']['desc'] ?></p> -->
				  	</div>
				</div>
			</div>
			<?php endforeach; else:?>
			<?php endif; ?>
		</div>
	</div>
	<!-- End Main Right -->
</div>